<template>
  <w-card shadow :title="title" title-class="green-light4--bg">
    <w-table
      :headers="table.headers"
      :items="table.items"
      select-row="select-row"
      @row-select="selectedRow = $event"
    ></w-table>
  </w-card>
</template>
<script>
  export default {
    props: {
      table: {
        type: Object,
      },
      title: {
        type: String,
      },
    },
    data: () => ({
      //   table: {
      //     headers: [
      //       { label: "ID", key: "id" },
      //       { label: "First name", key: "firstName" },
      //       { label: "Last name", key: "lastName" },
      //     ],
      //     items: [
      //       { id: 1, firstName: "Floretta", lastName: "Sampson" },
      //       {
      //         id: 2,
      //         firstName: "Nellie",
      //         lastName: "Lynn",
      //       },
      //       { id: 3, firstName: "Rory", lastName: "Bristol" },
      //       { id: 4, firstName: "Daley", lastName: "Elliott" },
      //       { id: 5, firstName: "Virgil", lastName: "Carman" },
      //     ],
      //     selectedRow: null,
      //   },
    }),
  };
</script>

<style>
  .w-card__content {
    padding: 0 !important;
  }
</style>
